// 对象类型推断
let o1 = {
  name: '孙小双',
  age: 22
}
// o1.code = "sunxiaoshuang"

// 对象赋值
let o2: object
o2 = { name: "孙小双" }
// o2.name


let o3: { name: string, age: number } = { name: '孙小双', age: 22 }
let o4: { name: string, age?: number } = { name: '华天晓' }
o4 = { name: '孙小双', age: 22 }
let o5: { name: string, age: number, [propName: string]: any } = {
  name: '孙小双', age: 22,
  code: "sunxiaoshuang"
}
console.log(o5)
